package com.reform.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.reform.pojo.phase.ViewSelectBatchPhase;
import com.reform.mapper.ViewSelectBatchPhaseMapper;
import com.reform.res.Result;
import com.reform.res.ResultCode;
import com.reform.service.IViewSelectBatchPhaseService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * VIEW 服务实现类
 * </p>
 *
 * @author mortale
 * @since 2021-09-13
 */
@Service
public class ViewSelectBatchPhaseServiceImpl extends ServiceImpl<ViewSelectBatchPhaseMapper, ViewSelectBatchPhase> implements IViewSelectBatchPhaseService {

    @Autowired
    ViewSelectBatchPhaseMapper viewSelectBatchPhaseMapper;

    @Override
    public Result getSelectByPhaseId(String phaseId) {
        return Result.success(ResultCode.SUCCESS, viewSelectBatchPhaseMapper.selectList(new QueryWrapper<ViewSelectBatchPhase>().eq("phase_id", phaseId)));
    }
}
